home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / TCP_IP / TNOS230S / STATS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-06  |  3.4 KB  |  129 lines

  1. #ifndef _STATS_H
  2. #define _STATS_H
  3.  
  4. #ifndef _FILES_H
  5. #include "files.h"
  6. #endif
  7.  
  8. #ifndef _COMMANDS_H
  9. #include "commands.h"
  10. #endif
  11.  
  12. #ifndef _SOCKET_H
  13. #include "socket.h"
  14. #endif
  15.  
  16. #ifndef _SESSION_H
  17. #include "session.h"
  18. #endif
  19.  
  20.  
  21. #define MSPHOUR (1000L*60L*60L)
  22. #define MSPDAY (1000L*60L*60L*24L)
  23.  
  24. #ifdef STATS_AREA
  25. int doSTATclear_area (int argc,char *argv[],void *p);
  26. void loadstats_area (void);
  27. void savestats_area (void);
  28. void updatestats_area (void);
  29. int doSTATarea (int argc,char *argv[],void *p);
  30. void newhour_area (int hour);
  31. void newday_area (int hour);
  32. void endmonthclear_area (int hour,int month);
  33. void endday_area (int hour);
  34. void eachcycle_area (time_t now);
  35. void init_area (time_t now);
  36. #endif
  37.  
  38. extern int BbsUsers, FtpUsers, Tutored;
  39. #ifdef STATS_USE
  40. extern long MiscUsers;
  41. extern long localConfUsers;
  42. int doSTATclear_use (int argc,char *argv[],void *p);
  43. void loadstats_use (void);
  44. void savestats_use (void);
  45. void updatestats_use (void);
  46. int doSTATusage (int argc,char *argv[],void *p);
  47. void newhour_use (int hour);
  48. void newday_use (int hour);
  49. void endmonthclear_use (int hour,int month);
  50. void endday_use (int hour);
  51. void eachcycle_use (time_t now);
  52. void init_use (time_t now);
  53. #endif
  54.  
  55. #ifdef STATS_FWD
  56. int doSTATclear_fwd (int argc,char *argv[],void *p);
  57. void loadstats_fwd (void);
  58. void savestats_fwd (void);
  59. void updatestats_fwd (void);
  60. int doSTATforward (int argc,char *argv[],void *p);
  61. void newhour_fwd (int hour);
  62. void newday_fwd (int hour);
  63. void endmonthclear_fwd (int hour,int month);
  64. void endday_fwd (int hour);
  65. void eachcycle_fwd (time_t now);
  66. void init_fwd (time_t now);
  67. #endif
  68.  
  69. #ifdef STATS_MSG
  70. int doSTATclear_msg (int argc,char *argv[],void *p);
  71. void loadstats_msg (void);
  72. void savestats_msg (void);
  73. void updatestats_msg (void);
  74. int doSTATmessage (int argc,char *argv[],void *p);
  75. void newhour_msg (int hour);
  76. void newday_msg (int hour);
  77. void endmonthclear_msg (int hour,int month);
  78. void endday_msg (int hour);
  79. void eachcycle_msg (time_t now);
  80. void init_msg (time_t now);
  81. #endif
  82.  
  83. #ifdef STATS_TFC
  84. int doSTATclear_tfc (int argc,char *argv[],void *p);
  85. void loadstats_tfc (void);
  86. void savestats_tfc (void);
  87. void updatestats_tfc (void);
  88. int doSTATtraffic (int argc,char *argv[],void *p);
  89. void newhour_tfc (int hour);
  90. void newday_tfc (int hour);
  91. void endmonthclear_tfc (int hour,int month);
  92. void endday_tfc (int hour);
  93. void eachcycle_tfc (time_t now);
  94. void init_tfc (time_t now);
  95. #endif
  96.  
  97. #ifdef STATS_HTTP
  98. int doSTATclear_http (int argc,char *argv[],void *p);
  99. void loadstats_http (void);
  100. void savestats_http (void);
  101. int doSTAThttp (int argc,char *argv[],void *p);
  102. void newhour_http (int hour);
  103. void newday_http (int hour);
  104. void endmonthclear_http (int hour,int month);
  105. void endday_http (int hour);
  106. void eachcycle_http (time_t now);
  107. void init_http (time_t now);
  108. #endif
  109.  
  110. #if defined(STATS_USE) || defined(STATS_MSG) || defined(STATS_AREA) || defined(STATS_FWD) || defined(STATS_TFC) || defined(STATS_HTTP)
  111. void doGraph (int num,long array[][2]);
  112. #endif
  113.  
  114.  
  115. extern const char dailyhdr[];
  116. extern const char weeklyhdr[];
  117. extern const char monthlyhdr[];
  118. extern const char yearlyhdr[];
  119. extern const char STAT_emptystr[];
  120. extern const char STAT_dailytrailer[];
  121. extern const char STAT_weeklytrailer[];
  122. extern const char STAT_monthlytrailer[];
  123. extern const char STAT_yearlytrailer[];
  124. extern const char STAT_cannotclear[];
  125.  
  126. extern const char *Months[12];
  127.  
  128. #endif /* _STATS_H */
  129.